package disenioPantallas.elementos;

import gestores.GestorSistema;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;

public class dialogGeneral extends JDialog {

	private final JPanel contentPanel = new JPanel();

	private GestorSistema gSistema= GestorSistema.getGestorSistema();
	public static void main(String[] args) {
		try {
			dialogGeneral dialog = new dialogGeneral();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public dialogGeneral() {
		super(GestorSistema.getGestorSistema().getFrame(),true);
		setPreferredSize(new Dimension(400, 600));
		
		try
		{
			JFrame.setDefaultLookAndFeelDecorated(true);
			JDialog.setDefaultLookAndFeelDecorated(true);
			UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
		}
		catch (Exception e)
		{
		 	e.printStackTrace();
		}


		
	}

	public void activarDG(){
		setLocationRelativeTo(getParent());
		setVisible(true);
		getParent().setFocusable(false);


	}

	public void cerrarDialog(){
		getParent().setFocusable(true);
		dispose();
		
	}

}


